1. Field of the Invention
The present invention relates to a processor power consumption estimating system, a processor power consumption estimating method, and a storage medium from which a processor power consumption estimating program can be read out. More particularly, the present invention relates to a power consumption estimating technology for estimating power consumption in a microprocessor with good precision based on a source program which is described by a programmer.
2. Description of the Related Art
In order to select type of a package into which a processor is incorporated and a battery capacity employed in the processor, power consumption is taken account when instructions are executed. As a means for evaluating power consumption in the processor, there is a system in which, after a processor is assumed virtually, the power consumption is calculated by simulating operations of the processor when an execution program is carried out by the processor. FIG. 1 is a block diagram showing a configuration of a simulation system. First, this simulation system receives a source program sequence 1 described by a programmer. This source program is a program which is at a function level and described by a source code. The source code is a program prior to compile. More particularly, the source code is described by a higher level language such as C language, Pascal, etc. and can be read by the human being. The source program sequence 1 is converted into an assembly code 3 by a compiler 2. The assembly code 3 is converted into an input signal 5, which is operated on the processor at a gate/transistor level, by a gate/transistor level converter 4. A gate/transistor level simulator 6 can estimate the power consumption 7A with high precision by executing a simulation at the gate/transistor level by using the gate/transistor level input signal 5.
In this manner, in the above simulation system, the source program 1, which is described by the programmer at the function level, is converted into the input signal 5 which is operated on the actual processor at the gate/transistor level. The power consumption is then calculated by simulating the actual operation in the processor at the gate/transistor level by using the gate/transistor level input signal 5. Therefore, estimation precision of the power consumption by using the above simulation system can be improved extremely high. For this reason, it is feasible to estimate the power consumption in the processor by applying the already-described program to this simulation system. However, since an execution speed of the simulation system is slow, it is not practical to employ the simulation system in the course of programming.
As a method of avoiding the problem that the execution speed of the above simulation system is slow, an estimation system which can estimate the power consumption directly from the assembly code has been proposed. This estimation system can compile the source program described by the programmer to the assembly code, and then estimate the power consumption with the use of the assembly code. Since the power consumption can be estimated from the assembly code without simulation of the operation in the processor, the higher execution speed can be achieved. Accordingly, it is possible to estimate quickly the power consumption of the processor with high precision by using the estimation system at the early stage of program design. As a result, in case a plurality of programs each having the same function are described and then the power consumption of the processor is compared with each other when the programs are executed, this estimation system is very effective. However, since the function level being programmed by the programmer and the assembly level do not always correspond to each other one by one, it is difficult for the programmer to correct the source program directly in the middle of programming, based on the estimated result of the power consumption being derived from the assembly code.